#ifndef GRITO_H
#define GRITO_H

#include <vector>
#include <SDL/SDL.h>

using namespace std;

class Grito {
  friend class Monitor;

  private:
    float position[3];
    int segmentos;

    float acumuladoRecorrido;
    float recorrido;
    float vel;

    long  duration;
		long  oldTime;
		long  oldTimeTrue;

    float *vx;
    float *vy;
    float *acumulados;

	public:
		Grito(float x, float y,
        long duration=500, float recorrido=300);
    ~Grito();

		void OnLoop();

    bool hasExpired();

    void OnRender(SDL_Surface* display);

    bool isIn(const float P[3]);
};

extern vector<Grito *>gritos;

#endif
